<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      a2ps-4.14
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;50.&nbsp;PostScript
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="ps.html" title="PostScript">Prev</a>
          <p>
            PostScript
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="enscript.html" title=
          "Enscript-1.6.6">Next</a>
          <p>
            Enscript-1.6.6
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="ps.html" title=
          "Chapter&nbsp;50.&nbsp;PostScript">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="a2ps" name="a2ps"></a>a2ps-4.14
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to a2ps
        </h2>
        <p>
          <span class="application">a2ps</span> is a filter utilized mainly
          in the background and primarily by printing scripts to convert
          almost every input format into PostScript output. The application's
          name expands appropriately to <span class=
          "quote">&ldquo;<span class="quote">all to
          PostScript</span>&rdquo;</span>.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <div class="admon caution">
          <img alt="[Caution]" src="../images/caution.png" />
          <h3>
            Caution
          </h3>
          <p>
            <span class="application">a2ps</span> cannot convert UTF-8
            encoded text to PostScript. The issue is discussed in detail in
            the <a class="xref" href=
            "../introduction/locale-issues.html#locale-not-valid-option"
            title=
            "The Needed Encoding is Not a Valid Option in the Program">Needed
            Encoding Not a Valid Option</a> section of the <a class="xref"
            href="../introduction/locale-issues.html" title=
            "Locale Related Issues">Locale Related Issues</a> page. The
            solution is to use <a class="xref" href="paps.html" title=
            "paps-0.7.1">paps-0.7.1</a> instead of <span class=
            "application">a2ps</span> for converting UTF-8 encoded text to
            PostScript.
          </p>
        </div>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://ftp.gnu.org/gnu/a2ps/a2ps-4.14.tar.gz">https://ftp.gnu.org/gnu/a2ps/a2ps-4.14.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download (FTP): <a class="ulink" href=
                "ftp://ftp.gnu.org/gnu/a2ps/a2ps-4.14.tar.gz">ftp://ftp.gnu.org/gnu/a2ps/a2ps-4.14.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 781ac3d9b213fa3e1ed0d79f986dc8c7
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 2.6 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 22 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.3 SBU
              </p>
            </li>
          </ul>
        </div>
        <h3>
          Additional Downloads
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                International fonts: <a class="ulink" href=
                "http://anduin.linuxfromscratch.org/BLFS/i18n-fonts/i18n-fonts-0.1.tar.bz2">
                http://anduin.linuxfromscratch.org/BLFS/i18n-fonts/i18n-fonts-0.1.tar.bz2</a>
              </p>
            </li>
          </ul>
        </div>
        <h3>
          a2ps Dependencies
        </h3>
        <h4>
          Recommended
        </h4>
        <p class="recommended">
          <a class="xref" href="psutils.html" title=
          "PSUtils-p17">PSUtils-p17</a>, and <a class="xref" href="cups.html"
          title="Cups-2.3.1">Cups-2.3.1</a> (otherwise, <span class=
          "application">a2ps</span> will use the <span class=
          "command"><strong>cat &gt;/dev/lp0</strong></span> command instead
          of <span class="command"><strong>lpr</strong></span> for sending
          its output to the printer)
        </p>
        <h4>
          Optional
        </h4>
        <p class="optional">
          <a class="xref" href="gs.html" title=
          "ghostscript-9.50">ghostscript-9.50</a>, <a class="xref" href=
          "../general/libpaper.html" title=
          "libpaper-1.1.24+nmu5">libpaper-1.1.24+nmu5</a>, <a class="xref"
          href="texlive.html" title=
          "texlive-20190410-source">texlive-20190410</a> (or <a class="xref"
          href="tl-installer.html" title="install-tl-unx">install-tl-unx</a>)
          <a class="xref" href="../x/installing.html" title=
          "Chapter&nbsp;24.&nbsp;X Window System Environment">X Window
          System</a>, <a class="ulink" href=
          "http://www.adobe.com/products/acrobat/readstep2.html">Adobe
          Reader</a>, and <a class="ulink" href=
          "http://www.gnu.org/software/ghostview/ghostview.html">Ghostview</a>
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/A2PS">http://wiki.linuxfromscratch.org/blfs/wiki/A2PS</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of a2ps
        </h2>
        <p>
          Install <span class="application">a2ps</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">autoconf &amp;&amp;
sed -i -e "s/GPERF --version |/&amp; head -n 1 |/" \
       -e "s|/usr/local/share|/usr/share|" configure &amp;&amp;

./configure --prefix=/usr  \
    --sysconfdir=/etc/a2ps \
    --enable-shared        \
    --with-medium=letter   &amp;&amp;
make                       &amp;&amp;
touch doc/*.info</kbd>
</pre>
        <p>
          To test the results, issue: <span class="command"><strong>make
          check</strong></span>. The <code class=
          "filename">printers.tst</code> test will fail, as there is no
          default test printer. The <code class="filename">styles.tst</code>
          may also fail, as the tests report some inconsistencies between the
          generated postscript and the reference sets. This is caused by
          version number differences between the postscript test files and
          those generated by the tests &mdash; these do not affect the
          operation of the program and can be ignored.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install</kbd>
</pre>
        <p>
          If desired, install the downloaded i18n-fonts by running the
          following commands as the <code class="systemitem">root</code>
          user:
        </p>
        <pre class="root">
<kbd class="command">tar -xf ../i18n-fonts-0.1.tar.bz2 &amp;&amp;
cp -v i18n-fonts-0.1/fonts/* /usr/share/a2ps/fonts               &amp;&amp;
cp -v i18n-fonts-0.1/afm/* /usr/share/a2ps/afm                   &amp;&amp;
pushd /usr/share/a2ps/afm    &amp;&amp;
  ./make_fonts_map.sh        &amp;&amp;
  mv fonts.map.new fonts.map &amp;&amp;
popd</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <span class="command"><strong>autoconf</strong></span>: This
          command is used to recreate the <span class=
          "command"><strong>configure</strong></span> script. This is
          required because there is an issue in the mktime test which causes
          the <span class="command"><strong>configure</strong></span> script
          to hang for 60 seconds and then report that there is no working
          mktime function.
        </p>
        <p>
          <span class="command"><strong>sed -i "s/GPERF --version |/&amp;
          head -n 1 |/" configure</strong></span>: This fixes a bug in the
          handling of the version output of <span class=
          "command"><strong>gperf</strong></span>.
        </p>
        <p>
          <span class="command"><strong>sed -i
          "s|/usr/local/share|/usr/share|" configure</strong></span>: This
          command modifies the <span class=
          "command"><strong>configure</strong></span> script to search for
          <span class="application">Ghostscript</span> fonts at the location
          where they were installed by the BLFS instructions.
        </p>
        <p>
          <em class="parameter"><code>--sysconfdir=/etc/a2ps</code></em>:
          Configuration data is installed in <code class=
          "filename">/etc/a2ps</code> instead of <code class=
          "filename">/usr/etc</code>.
        </p>
        <p>
          <em class="parameter"><code>--enable-shared</code></em>: This
          switch enables building the dynamic <code class=
          "filename">liba2ps</code> library.
        </p>
        <p>
          <em class="parameter"><code>--with-medium=letter</code></em>: This
          switch changes the default paper format to US letter. It can either
          be given here or set in <code class=
          "filename">/etc/a2ps/a2ps-site.cfg</code> after installation. The
          default is A4, but there are several other options, in particular:
          A4dj or letterdj are good settings for HP Deskjet and other
          printers that need wider paper-handling margins. See <code class=
          "filename">/etc/a2ps/a2ps.cfg</code> after installation.
        </p>
        <p>
          <span class="command"><strong>touch doc/*.info</strong></span>:
          This command avoids trying to regenerate the info files. This is an
          older package and the current .texi files will produce errors
          preventing <span class="command"><strong>make
          install</strong></span> from working properly.
        </p>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Configuring a2ps
        </h2>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3">
            <a id="a2ps-config" name="a2ps-config"></a>
          </h3>
          <h4 class="title">
            <a id="a2ps-config" name="a2ps-config"></a>Config Files
          </h4>
          <p>
            <code class="filename">/etc/a2ps/a2ps.cfg</code>, <code class=
            "filename">/etc/a2ps/a2ps-site.cfg</code>
          </p>
        </div>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3"></h3>
          <h4 class="title">
            <a id="idm45779230713264" name=
            "idm45779230713264"></a>Configuration Information
          </h4>
          <p>
            Information about configuring <span class=
            "application">a2ps</span> can be found in the comments contained
            in the above files, and also by running <span class=
            "command"><strong>info a2ps</strong></span>.
          </p>
        </div>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">a2ps, card, composeglyphs, fixnt, fixps,
              ogonkify, pdiff, psmandup, psset, and texi2dvi4a2ps</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Libraries:</strong>
              <span class="segbody">liba2ps.{so,a} and filter data</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">/etc/a2ps and /usr/share/a2ps</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="a2ps-prog" name="a2ps-prog"></a><span class=
                    "term"><span class=
                    "command"><strong>a2ps</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a filter, utilized primarily by printing scripts, that
                    converts standard input or supported files to PostScript.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="card" name="card"></a><span class=
                    "term"><span class=
                    "command"><strong>card</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    prints a reference card of a given program's options.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="composeglyphs" name=
                    "composeglyphs"></a><span class="term"><span class=
                    "command"><strong>composeglyphs</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    creates a composite font program.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="fixnt" name="fixnt"></a><span class=
                    "term"><span class=
                    "command"><strong>fixnt</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is supposed to fix the problems in the PostScript files
                    generated by the Microsoft PostScript driver under
                    Windows NT (3.5 and 4.0).
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="fixps" name="fixps"></a><span class=
                    "term"><span class=
                    "command"><strong>fixps</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    tries to fix common PostScript problems that break
                    postprocessing.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ogonkify" name="ogonkify"></a><span class=
                    "term"><span class=
                    "command"><strong>ogonkify</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    provides international support for Postscript by
                    performing various munging of PostScript files related to
                    printing in different languages.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pdiff" name="pdiff"></a><span class=
                    "term"><span class=
                    "command"><strong>pdiff</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    produces a pretty comparison between files.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="psmandup" name="psmandup"></a><span class=
                    "term"><span class=
                    "command"><strong>psmandup</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    tries to produce a version of a given PostScript file to
                    print in manual duplex.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="psset" name="psset"></a><span class=
                    "term"><span class=
                    "command"><strong>psset</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    produces a version of a given PostScript file with a
                    protected call to the PostScript operator
                    'setpagedevice'. Typical use is making a file print
                    duplex, or on the manual tray, etc.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="texi2dvi4a2ps" name=
                    "texi2dvi4a2ps"></a><span class="term"><span class=
                    "command"><strong>texi2dvi4a2ps</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    compiles Texinfo and LaTeX files to DVI or PDF
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-02-19 16:31:22 -0800
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="ps.html" title="PostScript">Prev</a>
          <p>
            PostScript
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="enscript.html" title=
          "Enscript-1.6.6">Next</a>
          <p>
            Enscript-1.6.6
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="ps.html" title=
          "Chapter&nbsp;50.&nbsp;PostScript">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
